package com.anxin.act.busFlow.entity;

import com.anxin.sys.file.entity.FileBase;
//import io.swagger.annotations.ApiModel;
//import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.anxin.framework.aspectj.lang.annotation.Excel;
import com.anxin.framework.web.entity.BaseEntity;

import java.util.List;

/**
 * 业务节点对象 wf_bus_node
 *
 * @author jbs
 * @date 2020-04-15
 */
//@ApiModel(description = "业务节点")
public class WfBusNode extends BaseEntity<WfBusNode>{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    //@ApiModelProperty(value = "主键ID",position=1)
    private String id;

    /** 关联的节点ID */
    @Excel(name = "关联的节点ID")
    //@ApiModelProperty(value = "关联的节点ID",position=2)
    private String nodeId;

    private String[] nodeIdArray;

    //@ApiModelProperty(value = "关联的节点的父节点ID",position=2)
    private String parentNodeId;

    // 关联的节点配置
    private WfConfigNode wfConfigNode;

    /** 表单数据ID */
    @Excel(name = "表单数据ID")
    //@ApiModelProperty(value = "表单数据ID",position=3)
    private String dataId;

    @Excel(name = "数据类型")
    //@ApiModelProperty(value = "数据类型",position=3)
    private String dataType;

    /** 业务数据ID,如项目ID */
    @Excel(name = "业务数据ID,如项目ID")
    //@ApiModelProperty(value = "业务数据ID,如项目ID",position=4)
    private String busId;

    //@ApiModelProperty(value = "轮次ID",position=4)
    private String roundId;

    /** 业务类型 */
    @Excel(name = "业务类型")
    //@ApiModelProperty(value = "业务类型",position=5)
    private String busType;

    /** 流程实例ID */
    @Excel(name = "流程实例ID")
    //@ApiModelProperty(value = "流程实例ID",position=6)
    private String actId;

    /** 审批状态 */
    @Excel(name = "审批状态")
    //@ApiModelProperty(value = "审批状态",position=7)
    private String actStatus;

    /** 审批状态集合，查询用 */
    //@ApiModelProperty(value = "审批状态集合",position=7)
    private String[] actStatusArray;

    /** 使用的表单类型 */
    @Excel(name = "使用的表单类型")
    //@ApiModelProperty(value = "使用的表单类型",position=8)
    private String formType;

    /** 使用的表单ID */
    @Excel(name = "使用的表单ID")
    //@ApiModelProperty(value = "使用的表单ID",position=9)
    private String formId;

    /** 使用流程的Key */
    @Excel(name = "使用流程的Key")
    //@ApiModelProperty(value = "使用流程的Key",position=10)
    private String processKey;

    /** 是否为最新启动的 Y是 N否 */
    @Excel(name = "是否为最新启动的 Y是 N否")
    //@ApiModelProperty(value = "是否为最新启动的 Y是 N否",position=11)
    private String latest;

    /** 启动次数 */
    @Excel(name = "启动次数")
    //@ApiModelProperty(value = "启动次数",position=12)
    private Integer restartNum;

    /**
     * 是否可以查看表单
     */
    //@ApiModelProperty(value = "是否可以查看表单",position=130)
    private boolean viewNode;

    /**
     * 是否可以编辑节点表单
     */
    //@ApiModelProperty(value = "是否可以编辑节点表单",position=130)
    private boolean editNode;

    /**
     * 是否可以启动流程
     */
    //@ApiModelProperty(value = "是否可以启动流程",position=140)
    private boolean startProcess;

    /**
     * 是否可以豁免流程
     */
    //@ApiModelProperty(value = "是否可以豁免流程",position=150)
    private boolean immunity;

    /**
     * 是否可以再次启动
     */
    //@ApiModelProperty(value = "是否可以再次启动",position=150)
    private boolean restart;

    /**
     * 是否需要操作按钮
     */
    //@ApiModelProperty(value = "是否需要操作按钮",position=150)
    private String operation;

    /**
     * 节点必须要上传的附件集合
     */
    private List<FileBase> fileList;

    private String title;

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public WfBusNode(){

    }

    /**
     * 初始化WfBusNode类
     * @param busId 业务ID
     * @param nodeId 节点ID
     * @param actStatus 审批状态
     */
    public WfBusNode(String busId,String nodeId,String actStatus){
        this.busId = busId;
        this.nodeId = nodeId;
        this.actStatus = actStatus;
    }

    /**
     * 初始化WfBusNode类
     * @param busId 业务ID
     * @param nodeId 节点ID
     * @param actStatusArray 审批状态
     */
    public WfBusNode(String busId,String nodeId,String[] actStatusArray){
        this.busId = busId;
        this.nodeId = nodeId;
        this.actStatusArray = actStatusArray;
    }

    public WfBusNode(WfConfigNode wfConfigNode){
        this.formType = wfConfigNode.getFormType();
        this.formId = wfConfigNode.getFormId();
        this.processKey = wfConfigNode.getProcessKey();
        this.nodeId = wfConfigNode.getId();
    }
    public List<FileBase> getFileList() {
        return fileList;
    }

    public void setFileList(List<FileBase> fileList) {
        this.fileList = fileList;
    }

    public void setId(String id){
        this.id = id;
    }

    public String getId(){
        return id;
    }
    public void setNodeId(String nodeId){
        this.nodeId = nodeId;
    }

    public String getNodeId(){
        return nodeId;
    }
    public void setDataId(String dataId){
        this.dataId = dataId;
    }

    public String getDataId(){
        return dataId;
    }
    public void setBusId(String busId){
        this.busId = busId;
    }

    public String getBusId(){
        return busId;
    }
    public void setBusType(String busType){
        this.busType = busType;
    }

    public String getBusType(){
        return busType;
    }
    public void setActId(String actId){
        this.actId = actId;
    }

    public String getActId(){
        return actId;
    }
    public void setActStatus(String actStatus){
        this.actStatus = actStatus;
    }

    public String getActStatus(){
        return actStatus;
    }
    public void setFormType(String formType){
        this.formType = formType;
    }

    public String getFormType(){
        return formType;
    }
    public void setFormId(String formId){
        this.formId = formId;
    }

    public String getFormId(){
        return formId;
    }
    public void setProcessKey(String processKey){
        this.processKey = processKey;
    }

    public String getProcessKey(){
        return processKey;
    }
    public void setLatest(String latest){
        this.latest = latest;
    }

    public String getLatest(){
        return latest;
    }
    public void setRestartNum(Integer restartNum){
        this.restartNum = restartNum;
    }

    public Integer getRestartNum(){
        return restartNum;
    }

    public WfConfigNode getWfConfigNode() {
        return wfConfigNode;
    }

    public void setWfConfigNode(WfConfigNode wfConfigNode) {
        this.wfConfigNode = wfConfigNode;
    }

    public String getParentNodeId() {
        return parentNodeId;
    }

    public void setParentNodeId(String parentNodeId) {
        this.parentNodeId = parentNodeId;
    }


    public boolean isViewNode() {
        return viewNode;
    }

    public void setViewNode(boolean viewNode) {
        this.viewNode = viewNode;
    }

    public boolean isStartProcess() {
        return startProcess;
    }

    public void setStartProcess(boolean startProcess) {
        this.startProcess = startProcess;
    }

    public boolean isImmunity() {
        return immunity;
    }

    public void setImmunity(boolean immunity) {
        this.immunity = immunity;
    }

    public boolean isRestart() {
        return restart;
    }

    public void setRestart(boolean restart) {
        this.restart = restart;
    }

    public String getDataType() {
        return dataType;
    }

    public void setDataType(String dataType) {
        this.dataType = dataType;
    }

    public String getOperation() {
        return operation;
    }

    public void setOperation(String operation) {
        this.operation = operation;
    }

    public String[] getActStatusArray() {
        return actStatusArray;
    }

    public void setActStatusArray(String[] actStatusArray) {
        this.actStatusArray = actStatusArray;
    }

    public String getRoundId() {
        return roundId;
    }

    public void setRoundId(String roundId) {
        this.roundId = roundId;
    }

    public boolean isEditNode() {
        return editNode;
    }

    public void setEditNode(boolean editNode) {
        this.editNode = editNode;
    }

    public String[] getNodeIdArray() {
        return nodeIdArray;
    }

    public void setNodeIdArray(String[] nodeIdArray) {
        this.nodeIdArray = nodeIdArray;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("nodeId", getNodeId())
            .append("dataId", getDataId())
            .append("busId", getBusId())
            .append("busType", getBusType())
            .append("actId", getActId())
            .append("actStatus", getActStatus())
            .append("formType", getFormType())
            .append("formId", getFormId())
            .append("processKey", getProcessKey())
            .append("latest", getLatest())
            .append("restartNum", getRestartNum())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
